package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.noticeannouncement;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class NoticeannouncementService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(NoticeannouncementService.class);


	/**
	 * 通知公告的列表查询
	 * @param
	 * @return
	 */
	public RespEntity listNoticeAnnouncementListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"listNoticeAnnouncementListPage","noticeAnnouncement");
	}

	/**
	 * 通知公告的新增或修改
	 * @param
	 * @return
	 */
	public RespEntity addOrUpdate(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return noticeannouncementJava(jsonParam,"addOrUpdate","noticeAnnouncement");
	}

	/**
	 * 通知公告的删除
	 * @param
	 * @return
	 */
	public RespEntity delete(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return noticeannouncementJava(jsonParam,"delete","noticeAnnouncement");
	}

	/**
	 * 通知公告详情
	 * @param
	 * @return
	 */
	public RespEntity getById(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"getById","noticeAnnouncement");
	}

	/**
	 * 字典组查询
	 * @param
	 * @return
	 */
	public RespEntity dictList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"dictList","noticeAnnouncement");
	}

	/**
	 * 工作管理信息统计
	 * @param
	 * @return
	 */
	public RespEntity workCount(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"workCount","noticeAnnouncement");
	}

	/**
	 * 安全知识分页列表
	 * @param
	 * @return
	 */
	public RespEntity getSafetyKnowledgeListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"getSafetyKnowledgeListPage","safetyknowledge");
	}

	/**
	 * 新增或编辑文章
	 * @param
	 * @return
	 */
	public RespEntity addOrUpdateArticle(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"addOrUpdateArticle","safetyknowledge");
	}

	/**
	 * 删除文章
	 * @param
	 * @return
	 */
	public RespEntity delArticle(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"delArticle","safetyknowledge");
	}
	/**
	 * 操作文章
	 * @param
	 * @return
	 */
	public RespEntity articleOperation(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"articleOperation","safetyknowledge");
	}

	/**
	 * 安全知识评论分页列表
	 * @param
	 * @return
	 */
	public RespEntity getCommentListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"getCommentListPage","safetyknowledge");
	}
	/**
	 * 新增评论
	 * @param
	 * @return
	 */
	public RespEntity addComment(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"addComment","safetyknowledge");
	}
	/**
	 * 删除评论
	 * @param
	 * @return
	 */
	public RespEntity delComment(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"delComment","safetyknowledge");
	}

	/**
	 * 图文类型不分页列表
	 * @param
	 * @return
	 */
	public RespEntity textTypeList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"textTypeList","safetyknowledge");
	}
	/**
	 * 图文类型详情
	 * @param
	 * @return
	 */
	public RespEntity detailsTextType(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"detailsTextType","safetyknowledge");
	}
	/**
	 * 图文类型新增、更新
	 * @param
	 * @return
	 */
	public RespEntity addOrUpdateTextType(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"addOrUpdateTextType","safetyknowledge");
	}
	/**
	 * 删除图文类型
	 * @param
	 * @return
	 */
	public RespEntity delTextType(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return noticeannouncementJava(jsonParam,"delTextType","safetyknowledge");
	}
}
